FROM gallop-cpp-builder:1.0.0

ARG SOFTWARE_BASE_URL

RUN mkdir /app && cd /app \
    && wget -O protoc-3.12.2-linux-x86_64.zip $SOFTWARE_BASE_URL/protoc-3.12.2-linux-x86_64.zip \
    && unzip protoc-3.12.2-linux-x86_64.zip -d protoc-3.12.2 \
    && mv protoc-3.12.2 /opt/protoc-3.12.2 \
    && ln -s /opt/protoc-3.12.2 /opt/protoc \
    && cd /  && rm -rf /app
   
ENV PATH /opt/protoc/bin:$PATH

